#ifndef _UDP_NET_COMMUNICATION_HEAD_H
#define _UDP_NET_COMMUNICATION_HEAD_H

#include "net-communication.h"
#include <string>

class UdpNetCommunication : public NetCommunication
{
public:
    UdpNetCommunication(const string &localIP = "127.0.0.1", uint16_t localPort = 8899);
    bool sendPacket(const vector<uint8_t> &packet);
    bool recvPacket(vector<uint8_t> &packet, int timeout = -1);

private:
    int socketfd;
    string peerIP;
    uint16_t peerPort;
};

#endif